/**
 * This file is part of 1genia trampoline
 * Copyright (C) 2007 1genia (contact@1genia.com)
 *
 * This library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; version 3 of the License. 
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details. 
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; see the file COPYING.TXT.  If not,
 * write to the Free Software Foundation, Inc., 51 Franklin Street,
 * Fifth Floor, Boston, MA 02110-1301, USA. 
 **/
package com.genia.toolbox.portlet.editor.gui.view.settings.panel;

import java.awt.event.ActionListener;
import java.util.List;

import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.event.DocumentListener;
import javax.swing.event.TableModelListener;

import com.genia.toolbox.basics.editor.model.document.VariableModel;
import com.genia.toolbox.portlet.editor.gui.PortletEditorGUI;
import com.genia.toolbox.portlet.editor.model.portlet.impl.PortletModel;

/**
 * Portlet settings interface.
 */
public interface PortletSettingsPanel
    extends ActionListener, DocumentListener, TableModelListener
{

  /**
   * Initialise the panel.
   */
  public void initialise();



  /**
   * Create the specific panel.
   * 
   * @return the specific panel.
   */
  public JPanel createSpecificPanel();



  /**
   * Create the common panel.
   * 
   * @return the common panel.
   */
  public JPanel createCommonSettingsPanel();



  /**
   * Create the attributes settings panel.
   * 
   * @return the attributes settings panel.
   */
  public JPanel createAttributesSettingsPanel();



  /**
   * Hide the identifier.
   */
  public void hideIdentifier();



  /**
   * Show the identifier.
   */
  public void showIdentifier();



  /**
   * Set the displayed portlet.
   * 
   * @param model
   *          the portlet model.
   */
  public void setPortlet(PortletModel model);



  /**
   * Initialise the attributes.
   * 
   * @param variables
   *          the attributes variables.
   */
  public void initialiseAttributes(List<VariableModel> variables);



  /**
   * The application PortletEditorGUI.
   * 
   * @return the application PortletEditorGUI.
   */
  public PortletEditorGUI getGui();



  /**
   * The displayed portlet model.
   * 
   * @return the displayed portlet model.
   */
  public PortletModel getPortlet();



  /**
   * Get the updated attributes.
   * 
   * @return the updated attributes.
   */
  public List<VariableModel> getUpdatedAttributes();



  /**
   * Check whether the settings are valid.
   */
  public void validateSettings();



  /**
   * Get the ID text field.
   * 
   * @return the ID text field.
   */
  public JTextField getTextId();



  /**
   * Get the specific panel.
   * 
   * @return the specific panel.
   */
  public JPanel getSpecificPanel();



  /**
   * Remove all listeners.
   */
  public void removeAllListeners();



  /**
   * Add all listeners.
   */
  public void addAllListeners();
}
